package com.aiit.datamanager.dao;

import com.aiit.datamanager.entity.TableInfo;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface TableInfoMapper {
    //根据DbId来查找TableName
    @Select({"select table_name from table_info where db_id = #{DbId}"})
    String[] selectTableNameByDbId(int DbId);

    //新增一个DbInfo
    int insertTableInfo(TableInfo tableInfo);

    //删除TableInfo信息
    @Delete({"delete from table_info where table_id = #{tableId}"})
    int deleteByTableId(int tableId);
}
